<?php
$GLOBALS['THRIFT_ROOT'] = 'thrift';

require_once 'thrift/Thrift.php';
require_once 'thrift/transport/TTransport.php';
require_once 'thrift/transport/TSocket.php';
require_once 'thrift/protocol/TBinaryProtocol.php';
require_once 'thrift/transport/TFramedTransport.php';
require_once 'thrift/transport/TBufferedTransport.php';

require_once 'thrift/packages/Arbol.php';
require_once 'thrift/packages/Types.php';

$transport = new TSocket('localhost', 7911);
$transport->open();

$protocol = new TBinaryProtocol($transport);

$client= new ArbolClient($protocol, $protocol);

$result = $client->add('param1');

Print 'result = ' . $result;

$transport->close();
?>